<template>
  <div class="houselist-v9">
    <div class="inner">
      <div class="cover">
        <img :src="houselist.data.image.url" alt="" />
        <div class="content">
          <div class="summary">
            {{ houselist.data.summaryText }}
          </div>
          <div class="name">
            {{ houselist.data.houseName }}
          </div>
          <div class="final">
            <van-rate
              :model-value="Number(houselist.data.commentScore)"
              :size="12"
              color="#fff"
              allow-half
            />
            <div class="price">￥{{ houselist.data.finalPrice }}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
const props = defineProps({
  houselist: {
    type: Object,
    default: () => ({}),
  },
})
</script>
<style lang="less" scoped>
.houselist-v9 {
  width: 50%;
  .inner {
    padding: 5px;
    background-color: #fff;
    .cover {
      position: relative;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      border: 1px solid #fff;
      img {
        width: 100%;
        border-radius: 6px;
      }
      .content {
        width: 90%;
        padding: 3px 8px;
        position: absolute;
        bottom: 0;
        display: flex;
        flex-direction: column;
        text-shadow: 3px #fff;

        .summary {
          font-size: 10px;
          font-weight: 600;
          color: #fff;
        }
        .name {
          margin-top: 7px;
          font-size: 12px;
          font-weight: 600;
          color: #fff;
          display: -webkit-box;
          overflow: hidden;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 2;
        }
        .final {
          margin-top: 7px;
          display: flex;
          justify-content: space-between;
          font-size: 12px;
          color: #fff;
        }
      }
    }
  }
}
</style>
